package cn.lizemin.observer.version0.entity;

/**
 * @author lzm
 * @version 1.0
 * @description: TODO
 * @date 2022/4/20 11:22
 */
public class Buyer {

    /**买家姓名*/
    private String name ;

    public Buyer(String name) {
        this.name = name;
    }

    public void buy(String product) {
        if (product.contains("手机")) {
            System.out.println(name + "买到了" + product);
        }
    }

}
